package com.zeng.sys.authmd.apimodule.vo;

import com.zeng.nicecore.validation.ValidGroup;
import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class PermissionVo {

    //资源名称
    @NotBlank(groups = {ValidGroup.add.class},message = "资源名称不能为空")
    private String name;

    //资源类型：menu,button,
    private String type;

    //访问url地址
    private String url;

    //父结点id
    private String parentCode;

    //父结点id列表串
    private String parentCodes;

    //排序号
    private String sortString;

    //权限配置
    private String perConfig;

    //'是否可用,1：可用，0不可用
    @NotNull(groups = {ValidGroup.add.class},message = "是否可用不能为空")
    private Short available;

    private List<PermissionVo> childrens;


    private Integer version;

    private Short valid;

    private String code;

    private Integer id;

    private Date updateDate;

    private Date insertDate;
}